Conventional mechanical switches are used in numerous applications in electronic products. For example, many button and keyboard designs include mechanically based actuators that rely on relatively large movements to complete electrical circuits. Advantages of mechanical switches include their low cost and ability to provide audible and tactile response to a user. However, mechanical switches are relatively large in size and, therefore, are difficult to integrate into products that have very limited space. This can be a major obstacle for integrating into modern portable electronic products, which include a multitude of electronic components packed within small enclosures. Furthermore, mechanical switches can wear out quickly, and therefore may need frequent replacing. What are needed, therefore, are improved sensor and actuator designs for electronic devices.